package org.yxj.changethemeapp

import android.content.Context

/**
 *
 *
 * @author  on 2024/6/24
 */
object CacheThemeManager {


    /**
     *
     */
    fun save(ctx: Context, b: Boolean) {
        val spf = ctx.getSharedPreferences("Data", 0)
        val edit = spf.edit()
        edit.putBoolean("isDarkModeStatus", b)
        edit.commit()
    }


    fun isDarkModeStatus(ctx: Context): Boolean {
        val spf = ctx.getSharedPreferences("Data", 0)
        return spf.getBoolean("isDarkModeStatus", false)
    }
}